home *** CD-ROM | disk | FTP | other *** search
/ Aminet 50 / Aminet 50 (2002)(GTI - Schatztruhe)[!][Aug 2002].iso / Aminet / dev / gcc / ppc-mos-gcc.lha / info / gcc.info-27 (.txt) < prev    next >
GNU Info File  |  2002-06-18  |  41KB  |  739 lines

  1. This is Info file gcc.info, produced by Makeinfo version 1.68 from the
  2. input file ./gcc.texi.
  3. INFO-DIR-SECTION Programming
  4. START-INFO-DIR-ENTRY
  5. * gcc: (gcc).                  The GNU Compiler Collection.
  6. END-INFO-DIR-ENTRY
  7.    This file documents the use and the internals of the GNU compiler.
  8.    Published by the Free Software Foundation 59 Temple Place - Suite 330
  9. Boston, MA 02111-1307 USA
  10.    Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
  11. 1999, 2000 Free Software Foundation, Inc.
  12.    Permission is granted to make and distribute verbatim copies of this
  13. manual provided the copyright notice and this permission notice are
  14. preserved on all copies.
  15.    Permission is granted to copy and distribute modified versions of
  16. this manual under the conditions for verbatim copying, provided also
  17. that the sections entitled "GNU General Public License" and "Funding
  18. for Free Software" are included exactly as in the original, and
  19. provided that the entire resulting derived work is distributed under
  20. the terms of a permission notice identical to this one.
  21.    Permission is granted to copy and distribute translations of this
  22. manual into another language, under the above conditions for modified
  23. versions, except that the sections entitled "GNU General Public
  24. License" and "Funding for Free Software", and this permission notice,
  25. may be included in translations approved by the Free Software Foundation
  26. instead of in the original English.
  27. File: gcc.info,  Node: Instruction Output,  Next: Dispatch Tables,  Prev: Macros for Initialization,  Up: Assembler Format
  28. Output of Assembler Instructions
  29. --------------------------------
  30.    This describes assembler instruction output.
  31. `REGISTER_NAMES'
  32.      A C initializer containing the assembler's names for the machine
  33.      registers, each one as a C string constant.  This is what
  34.      translates register numbers in the compiler into assembler
  35.      language.
  36. `ADDITIONAL_REGISTER_NAMES'
  37.      If defined, a C initializer for an array of structures containing
  38.      a name and a register number.  This macro defines additional names
  39.      for hard registers, thus allowing the `asm' option in declarations
  40.      to refer to registers using alternate names.
  41. `ASM_OUTPUT_OPCODE (STREAM, PTR)'
  42.      Define this macro if you are using an unusual assembler that
  43.      requires different names for the machine instructions.
  44.      The definition is a C statement or statements which output an
  45.      assembler instruction opcode to the stdio stream STREAM.  The
  46.      macro-operand PTR is a variable of type `char *' which points to
  47.      the opcode name in its "internal" form--the form that is written
  48.      in the machine description.  The definition should output the
  49.      opcode name to STREAM, performing any translation you desire, and
  50.      increment the variable PTR to point at the end of the opcode so
  51.      that it will not be output twice.
  52.      In fact, your macro definition may process less than the entire
  53.      opcode name, or more than the opcode name; but if you want to
  54.      process text that includes `%'-sequences to substitute operands,
  55.      you must take care of the substitution yourself.  Just be sure to
  56.      increment PTR over whatever text should not be output normally.
  57.      If you need to look at the operand values, they can be found as the
  58.      elements of `recog_operand'.
  59.      If the macro definition does nothing, the instruction is output in
  60.      the usual way.
  61. `FINAL_PRESCAN_INSN (INSN, OPVEC, NOPERANDS)'
  62.      If defined, a C statement to be executed just prior to the output
  63.      of assembler code for INSN, to modify the extracted operands so
  64.      they will be output differently.
  65.      Here the argument OPVEC is the vector containing the operands
  66.      extracted from INSN, and NOPERANDS is the number of elements of
  67.      the vector which contain meaningful data for this insn.  The
  68.      contents of this vector are what will be used to convert the insn
  69.      template into assembler code, so you can change the assembler
  70.      output by changing the contents of the vector.
  71.      This macro is useful when various assembler syntaxes share a single
  72.      file of instruction patterns; by defining this macro differently,
  73.      you can cause a large class of instructions to be output
  74.      differently (such as with rearranged operands).  Naturally,
  75.      variations in assembler syntax affecting individual insn patterns
  76.      ought to be handled by writing conditional output routines in
  77.      those patterns.
  78.      If this macro is not defined, it is equivalent to a null statement.
  79. `FINAL_PRESCAN_LABEL'
  80.      If defined, `FINAL_PRESCAN_INSN' will be called on each
  81.      `CODE_LABEL'.  In that case, OPVEC will be a null pointer and
  82.      NOPERANDS will be zero.
  83. `PRINT_OPERAND (STREAM, X, CODE)'
  84.      A C compound statement to output to stdio stream STREAM the
  85.      assembler syntax for an instruction operand X.  X is an RTL
  86.      expression.
  87.      CODE is a value that can be used to specify one of several ways of
  88.      printing the operand.  It is used when identical operands must be
  89.      printed differently depending on the context.  CODE comes from the
  90.      `%' specification that was used to request printing of the
  91.      operand.  If the specification was just `%DIGIT' then CODE is 0;
  92.      if the specification was `%LTR DIGIT' then CODE is the ASCII code
  93.      for LTR.
  94.      If X is a register, this macro should print the register's name.
  95.      The names can be found in an array `reg_names' whose type is `char
  96.      *[]'.  `reg_names' is initialized from `REGISTER_NAMES'.
  97.      When the machine description has a specification `%PUNCT' (a `%'
  98.      followed by a punctuation character), this macro is called with a
  99.      null pointer for X and the punctuation character for CODE.
  100. `PRINT_OPERAND_PUNCT_VALID_P (CODE)'
  101.      A C expression which evaluates to true if CODE is a valid
  102.      punctuation character for use in the `PRINT_OPERAND' macro.  If
  103.      `PRINT_OPERAND_PUNCT_VALID_P' is not defined, it means that no
  104.      punctuation characters (except for the standard one, `%') are used
  105.      in this way.
  106. `PRINT_OPERAND_ADDRESS (STREAM, X)'
  107.      A C compound statement to output to stdio stream STREAM the
  108.      assembler syntax for an instruction operand that is a memory
  109.      reference whose address is X.  X is an RTL expression.
  110.      On some machines, the syntax for a symbolic address depends on the
  111.      section that the address refers to.  On these machines, define the
  112.      macro `ENCODE_SECTION_INFO' to store the information into the
  113.      `symbol_ref', and then check for it here.  *Note Assembler
  114.      Format::.
  115. `DBR_OUTPUT_SEQEND(FILE)'
  116.      A C statement, to be executed after all slot-filler instructions
  117.      have been output.  If necessary, call `dbr_sequence_length' to
  118.      determine the number of slots filled in a sequence (zero if not
  119.      currently outputting a sequence), to decide how many no-ops to
  120.      output, or whatever.
  121.      Don't define this macro if it has nothing to do, but it is helpful
  122.      in reading assembly output if the extent of the delay sequence is
  123.      made explicit (e.g. with white space).
  124.      Note that output routines for instructions with delay slots must be
  125.      prepared to deal with not being output as part of a sequence (i.e.
  126.      when the scheduling pass is not run, or when no slot fillers could
  127.      be found.)  The variable `final_sequence' is null when not
  128.      processing a sequence, otherwise it contains the `sequence' rtx
  129.      being output.
  130. `REGISTER_PREFIX'
  131. `LOCAL_LABEL_PREFIX'
  132. `USER_LABEL_PREFIX'
  133. `IMMEDIATE_PREFIX'
  134.      If defined, C string expressions to be used for the `%R', `%L',
  135.      `%U', and `%I' options of `asm_fprintf' (see `final.c').  These
  136.      are useful when a single `md' file must support multiple assembler
  137.      formats.  In that case, the various `tm.h' files can define these
  138.      macros differently.
  139. `ASSEMBLER_DIALECT'
  140.      If your target supports multiple dialects of assembler language
  141.      (such as different opcodes), define this macro as a C expression
  142.      that gives the numeric index of the assembler language dialect to
  143.      use, with zero as the first variant.
  144.      If this macro is defined, you may use constructs of the form
  145.      `{option0|option1|option2...}' in the output templates of patterns
  146.      (*note Output Template::.) or in the first argument of
  147.      `asm_fprintf'.  This construct outputs `option0', `option1' or
  148.      `option2', etc., if the value of `ASSEMBLER_DIALECT' is zero, one
  149.      or two, etc.  Any special characters within these strings retain
  150.      their usual meaning.
  151.      If you do not define this macro, the characters `{', `|' and `}'
  152.      do not have any special meaning when used in templates or operands
  153.      to `asm_fprintf'.
  154.      Define the macros `REGISTER_PREFIX', `LOCAL_LABEL_PREFIX',
  155.      `USER_LABEL_PREFIX' and `IMMEDIATE_PREFIX' if you can express the
  156.      variations in assembler language syntax with that mechanism.
  157.      Define `ASSEMBLER_DIALECT' and use the `{option0|option1}' syntax
  158.      if the syntax variant are larger and involve such things as
  159.      different opcodes or operand order.
  160. `ASM_OUTPUT_REG_PUSH (STREAM, REGNO)'
  161.      A C expression to output to STREAM some assembler code which will
  162.      push hard register number REGNO onto the stack.  The code need not
  163.      be optimal, since this macro is used only when profiling.
  164. `ASM_OUTPUT_REG_POP (STREAM, REGNO)'
  165.      A C expression to output to STREAM some assembler code which will
  166.      pop hard register number REGNO off of the stack.  The code need
  167.      not be optimal, since this macro is used only when profiling.
  168. File: gcc.info,  Node: Dispatch Tables,  Next: Exception Region Output,  Prev: Instruction Output,  Up: Assembler Format
  169. Output of Dispatch Tables
  170. -------------------------
  171.    This concerns dispatch tables.
  172. `ASM_OUTPUT_ADDR_DIFF_ELT (STREAM, BODY, VALUE, REL)'
  173.      A C statement to output to the stdio stream STREAM an assembler
  174.      pseudo-instruction to generate a difference between two labels.
  175.      VALUE and REL are the numbers of two internal labels.  The
  176.      definitions of these labels are output using
  177.      `ASM_OUTPUT_INTERNAL_LABEL', and they must be printed in the same
  178.      way here.  For example,
  179.           fprintf (STREAM, "\t.word L%d-L%d\n",
  180.                    VALUE, REL)
  181.      You must provide this macro on machines where the addresses in a
  182.      dispatch table are relative to the table's own address.  If
  183.      defined, GNU CC will also use this macro on all machines when
  184.      producing PIC.  BODY is the body of the ADDR_DIFF_VEC; it is
  185.      provided so that the mode and flags can be read.
  186. `ASM_OUTPUT_ADDR_VEC_ELT (STREAM, VALUE)'
  187.      This macro should be provided on machines where the addresses in a
  188.      dispatch table are absolute.
  189.      The definition should be a C statement to output to the stdio
  190.      stream STREAM an assembler pseudo-instruction to generate a
  191.      reference to a label.  VALUE is the number of an internal label
  192.      whose definition is output using `ASM_OUTPUT_INTERNAL_LABEL'.  For
  193.      example,
  194.           fprintf (STREAM, "\t.word L%d\n", VALUE)
  195. `ASM_OUTPUT_CASE_LABEL (STREAM, PREFIX, NUM, TABLE)'
  196.      Define this if the label before a jump-table needs to be output
  197.      specially.  The first three arguments are the same as for
  198.      `ASM_OUTPUT_INTERNAL_LABEL'; the fourth argument is the jump-table
  199.      which follows (a `jump_insn' containing an `addr_vec' or
  200.      `addr_diff_vec').
  201.      This feature is used on system V to output a `swbeg' statement for
  202.      the table.
  203.      If this macro is not defined, these labels are output with
  204.      `ASM_OUTPUT_INTERNAL_LABEL'.
  205. `ASM_OUTPUT_CASE_END (STREAM, NUM, TABLE)'
  206.      Define this if something special must be output at the end of a
  207.      jump-table.  The definition should be a C statement to be executed
  208.      after the assembler code for the table is written.  It should write
  209.      the appropriate code to stdio stream STREAM.  The argument TABLE
  210.      is the jump-table insn, and NUM is the label-number of the
  211.      preceding label.
  212.      If this macro is not defined, nothing special is output at the end
  213.      of the jump-table.
  214. File: gcc.info,  Node: Exception Region Output,  Next: Alignment Output,  Prev: Dispatch Tables,  Up: Assembler Format
  215. Assembler Commands for Exception Regions
  216. ----------------------------------------
  217.    This describes commands marking the start and the end of an exception
  218. region.
  219. `ASM_OUTPUT_EH_REGION_BEG ()'
  220.      A C expression to output text to mark the start of an exception
  221.      region.
  222.      This macro need not be defined on most platforms.
  223. `ASM_OUTPUT_EH_REGION_END ()'
  224.      A C expression to output text to mark the end of an exception
  225.      region.
  226.      This macro need not be defined on most platforms.
  227. `EXCEPTION_SECTION ()'
  228.      A C expression to switch to the section in which the main
  229.      exception table is to be placed (*note Sections::.).  The default
  230.      is a section named `.gcc_except_table' on machines that support
  231.      named sections via `ASM_OUTPUT_SECTION_NAME', otherwise if `-fpic'
  232.      or `-fPIC' is in effect, the `data_section', otherwise the
  233.      `readonly_data_section'.
  234. `EH_FRAME_SECTION_ASM_OP'
  235.      If defined, a C string constant for the assembler operation to
  236.      switch to the section for exception handling frame unwind
  237.      information.  If not defined, GNU CC will provide a default
  238.      definition if the target supports named sections.  `crtstuff.c'
  239.      uses this macro to switch to the appropriate section.
  240.      You should define this symbol if your target supports DWARF 2 frame
  241.      unwind information and the default definition does not work.
  242. `OMIT_EH_TABLE ()'
  243.      A C expression that is nonzero if the normal exception table output
  244.      should be omitted.
  245.      This macro need not be defined on most platforms.
  246. `EH_TABLE_LOOKUP ()'
  247.      Alternate runtime support for looking up an exception at runtime
  248.      and finding the associated handler, if the default method won't
  249.      work.
  250.      This macro need not be defined on most platforms.
  251. `DOESNT_NEED_UNWINDER'
  252.      A C expression that decides whether or not the current function
  253.      needs to have a function unwinder generated for it.  See the file
  254.      `except.c' for details on when to define this, and how.
  255. `MASK_RETURN_ADDR'
  256.      An rtx used to mask the return address found via RETURN_ADDR_RTX,
  257.      so that it does not contain any extraneous set bits in it.
  258. `DWARF2_UNWIND_INFO'
  259.      Define this macro to 0 if your target supports DWARF 2 frame unwind
  260.      information, but it does not yet work with exception handling.
  261.      Otherwise, if your target supports this information (if it defines
  262.      `INCOMING_RETURN_ADDR_RTX' and either `UNALIGNED_INT_ASM_OP' or
  263.      `OBJECT_FORMAT_ELF'), GCC will provide a default definition of 1.
  264.      If this macro is defined to 1, the DWARF 2 unwinder will be the
  265.      default exception handling mechanism; otherwise, setjmp/longjmp
  266.      will be used by default.
  267.      If this macro is defined to anything, the DWARF 2 unwinder will be
  268.      used instead of inline unwinders and __unwind_function in the
  269.      non-setjmp case.
  270. File: gcc.info,  Node: Alignment Output,  Prev: Exception Region Output,  Up: Assembler Format
  271. Assembler Commands for Alignment
  272. --------------------------------
  273.    This describes commands for alignment.
  274. `LABEL_ALIGN_AFTER_BARRIER (LABEL)'
  275.      The alignment (log base 2) to put in front of LABEL, which follows
  276.      a BARRIER.
  277.      This macro need not be defined if you don't want any special
  278.      alignment to be done at such a time.  Most machine descriptions do
  279.      not currently define the macro.
  280. `LOOP_ALIGN (LABEL)'
  281.      The alignment (log base 2) to put in front of LABEL, which follows
  282.      a NOTE_INSN_LOOP_BEG note.
  283.      This macro need not be defined if you don't want any special
  284.      alignment to be done at such a time.  Most machine descriptions do
  285.      not currently define the macro.
  286. `LABEL_ALIGN (LABEL)'
  287.      The alignment (log base 2) to put in front of LABEL.  If
  288.      LABEL_ALIGN_AFTER_BARRIER / LOOP_ALIGN specify a different
  289.      alignment, the maximum of the specified values is used.
  290. `ASM_OUTPUT_SKIP (STREAM, NBYTES)'
  291.      A C statement to output to the stdio stream STREAM an assembler
  292.      instruction to advance the location counter by NBYTES bytes.
  293.      Those bytes should be zero when loaded.  NBYTES will be a C
  294.      expression of type `int'.
  295. `ASM_NO_SKIP_IN_TEXT'
  296.      Define this macro if `ASM_OUTPUT_SKIP' should not be used in the
  297.      text section because it fails to put zeros in the bytes that are
  298.      skipped.  This is true on many Unix systems, where the pseudo-op
  299.      to skip bytes produces no-op instructions rather than zeros when
  300.      used in the text section.
  301. `ASM_OUTPUT_ALIGN (STREAM, POWER)'
  302.      A C statement to output to the stdio stream STREAM an assembler
  303.      command to advance the location counter to a multiple of 2 to the
  304.      POWER bytes.  POWER will be a C expression of type `int'.
  305. `ASM_OUTPUT_MAX_SKIP_ALIGN (STREAM, POWER, MAX_SKIP)'
  306.      A C statement to output to the stdio stream STREAM an assembler
  307.      command to advance the location counter to a multiple of 2 to the
  308.      POWER bytes, but only if MAX_SKIP or fewer bytes are needed to
  309.      satisfy the alignment request.  POWER and MAX_SKIP will be a C
  310.      expression of type `int'.
  311. File: gcc.info,  Node: Debugging Info,  Next: Cross-compilation,  Prev: Assembler Format,  Up: Target Macros
  312. Controlling Debugging Information Format
  313. ========================================
  314.    This describes how to specify debugging information.
  315. * Menu:
  316. * All Debuggers::      Macros that affect all debugging formats uniformly.
  317. * DBX Options::        Macros enabling specific options in DBX format.
  318. * DBX Hooks::          Hook macros for varying DBX format.
  319. * File Names and DBX:: Macros controlling output of file names in DBX format.
  320. * SDB and DWARF::      Macros for SDB (COFF) and DWARF formats.
  321. File: gcc.info,  Node: All Debuggers,  Next: DBX Options,  Up: Debugging Info
  322. Macros Affecting All Debugging Formats
  323. --------------------------------------
  324.    These macros affect all debugging formats.
  325. `DBX_REGISTER_NUMBER (REGNO)'
  326.      A C expression that returns the DBX register number for the
  327.      compiler register number REGNO.  In simple cases, the value of this
  328.      expression may be REGNO itself.  But sometimes there are some
  329.      registers that the compiler knows about and DBX does not, or vice
  330.      versa.  In such cases, some register may need to have one number in
  331.      the compiler and another for DBX.
  332.      If two registers have consecutive numbers inside GNU CC, and they
  333.      can be used as a pair to hold a multiword value, then they *must*
  334.      have consecutive numbers after renumbering with
  335.      `DBX_REGISTER_NUMBER'.  Otherwise, debuggers will be unable to
  336.      access such a pair, because they expect register pairs to be
  337.      consecutive in their own numbering scheme.
  338.      If you find yourself defining `DBX_REGISTER_NUMBER' in way that
  339.      does not preserve register pairs, then what you must do instead is
  340.      redefine the actual register numbering scheme.
  341. `DEBUGGER_AUTO_OFFSET (X)'
  342.      A C expression that returns the integer offset value for an
  343.      automatic variable having address X (an RTL expression).  The
  344.      default computation assumes that X is based on the frame-pointer
  345.      and gives the offset from the frame-pointer.  This is required for
  346.      targets that produce debugging output for DBX or COFF-style
  347.      debugging output for SDB and allow the frame-pointer to be
  348.      eliminated when the `-g' options is used.
  349. `DEBUGGER_ARG_OFFSET (OFFSET, X)'
  350.      A C expression that returns the integer offset value for an
  351.      argument having address X (an RTL expression).  The nominal offset
  352.      is OFFSET.
  353. `PREFERRED_DEBUGGING_TYPE'
  354.      A C expression that returns the type of debugging output GNU CC
  355.      should produce when the user specifies just `-g'.  Define this if
  356.      you have arranged for GNU CC to support more than one format of
  357.      debugging output.  Currently, the allowable values are `DBX_DEBUG',
  358.      `SDB_DEBUG', `DWARF_DEBUG', `DWARF2_DEBUG', and `XCOFF_DEBUG'.
  359.      When the user specifies `-ggdb', GNU CC normally also uses the
  360.      value of this macro to select the debugging output format, but
  361.      with two exceptions.  If `DWARF2_DEBUGGING_INFO' is defined and
  362.      `LINKER_DOES_NOT_WORK_WITH_DWARF2' is not defined, GNU CC uses the
  363.      value `DWARF2_DEBUG'.  Otherwise, if `DBX_DEBUGGING_INFO' is
  364.      defined, GNU CC uses `DBX_DEBUG'.
  365.      The value of this macro only affects the default debugging output;
  366.      the user can always get a specific type of output by using
  367.      `-gstabs', `-gcoff', `-gdwarf-1', `-gdwarf-2', or `-gxcoff'.
  368. File: gcc.info,  Node: DBX Options,  Next: DBX Hooks,  Prev: All Debuggers,  Up: Debugging Info
  369. Specific Options for DBX Output
  370. -------------------------------
  371.    These are specific options for DBX output.
  372. `DBX_DEBUGGING_INFO'
  373.      Define this macro if GNU CC should produce debugging output for DBX
  374.      in response to the `-g' option.
  375. `XCOFF_DEBUGGING_INFO'
  376.      Define this macro if GNU CC should produce XCOFF format debugging
  377.      output in response to the `-g' option.  This is a variant of DBX
  378.      format.
  379. `DEFAULT_GDB_EXTENSIONS'
  380.      Define this macro to control whether GNU CC should by default
  381.      generate GDB's extended version of DBX debugging information
  382.      (assuming DBX-format debugging information is enabled at all).  If
  383.      you don't define the macro, the default is 1: always generate the
  384.      extended information if there is any occasion to.
  385. `DEBUG_SYMS_TEXT'
  386.      Define this macro if all `.stabs' commands should be output while
  387.      in the text section.
  388. `ASM_STABS_OP'
  389.      A C string constant naming the assembler pseudo op to use instead
  390.      of `.stabs' to define an ordinary debugging symbol.  If you don't
  391.      define this macro, `.stabs' is used.  This macro applies only to
  392.      DBX debugging information format.
  393. `ASM_STABD_OP'
  394.      A C string constant naming the assembler pseudo op to use instead
  395.      of `.stabd' to define a debugging symbol whose value is the current
  396.      location.  If you don't define this macro, `.stabd' is used.  This
  397.      macro applies only to DBX debugging information format.
  398. `ASM_STABN_OP'
  399.      A C string constant naming the assembler pseudo op to use instead
  400.      of `.stabn' to define a debugging symbol with no name.  If you
  401.      don't define this macro, `.stabn' is used.  This macro applies
  402.      only to DBX debugging information format.
  403. `DBX_NO_XREFS'
  404.      Define this macro if DBX on your system does not support the
  405.      construct `xsTAGNAME'.  On some systems, this construct is used to
  406.      describe a forward reference to a structure named TAGNAME.  On
  407.      other systems, this construct is not supported at all.
  408. `DBX_CONTIN_LENGTH'
  409.      A symbol name in DBX-format debugging information is normally
  410.      continued (split into two separate `.stabs' directives) when it
  411.      exceeds a certain length (by default, 80 characters).  On some
  412.      operating systems, DBX requires this splitting; on others,
  413.      splitting must not be done.  You can inhibit splitting by defining
  414.      this macro with the value zero.  You can override the default
  415.      splitting-length by defining this macro as an expression for the
  416.      length you desire.
  417. `DBX_CONTIN_CHAR'
  418.      Normally continuation is indicated by adding a `\' character to
  419.      the end of a `.stabs' string when a continuation follows.  To use
  420.      a different character instead, define this macro as a character
  421.      constant for the character you want to use.  Do not define this
  422.      macro if backslash is correct for your system.
  423. `DBX_STATIC_STAB_DATA_SECTION'
  424.      Define this macro if it is necessary to go to the data section
  425.      before outputting the `.stabs' pseudo-op for a non-global static
  426.      variable.
  427. `DBX_TYPE_DECL_STABS_CODE'
  428.      The value to use in the "code" field of the `.stabs' directive for
  429.      a typedef.  The default is `N_LSYM'.
  430. `DBX_STATIC_CONST_VAR_CODE'
  431.      The value to use in the "code" field of the `.stabs' directive for
  432.      a static variable located in the text section.  DBX format does not
  433.      provide any "right" way to do this.  The default is `N_FUN'.
  434. `DBX_REGPARM_STABS_CODE'
  435.      The value to use in the "code" field of the `.stabs' directive for
  436.      a parameter passed in registers.  DBX format does not provide any
  437.      "right" way to do this.  The default is `N_RSYM'.
  438. `DBX_REGPARM_STABS_LETTER'
  439.      The letter to use in DBX symbol data to identify a symbol as a
  440.      parameter passed in registers.  DBX format does not customarily
  441.      provide any way to do this.  The default is `'P''.
  442. `DBX_MEMPARM_STABS_LETTER'
  443.      The letter to use in DBX symbol data to identify a symbol as a
  444.      stack parameter.  The default is `'p''.
  445. `DBX_FUNCTION_FIRST'
  446.      Define this macro if the DBX information for a function and its
  447.      arguments should precede the assembler code for the function.
  448.      Normally, in DBX format, the debugging information entirely
  449.      follows the assembler code.
  450. `DBX_LBRAC_FIRST'
  451.      Define this macro if the `N_LBRAC' symbol for a block should
  452.      precede the debugging information for variables and functions
  453.      defined in that block.  Normally, in DBX format, the `N_LBRAC'
  454.      symbol comes first.
  455. `DBX_BLOCKS_FUNCTION_RELATIVE'
  456.      Define this macro if the value of a symbol describing the scope of
  457.      a block (`N_LBRAC' or `N_RBRAC') should be relative to the start
  458.      of the enclosing function.  Normally, GNU C uses an absolute
  459.      address.
  460. `DBX_USE_BINCL'
  461.      Define this macro if GNU C should generate `N_BINCL' and `N_EINCL'
  462.      stabs for included header files, as on Sun systems.  This macro
  463.      also directs GNU C to output a type number as a pair of a file
  464.      number and a type number within the file.  Normally, GNU C does not
  465.      generate `N_BINCL' or `N_EINCL' stabs, and it outputs a single
  466.      number for a type number.
  467. File: gcc.info,  Node: DBX Hooks,  Next: File Names and DBX,  Prev: DBX Options,  Up: Debugging Info
  468. Open-Ended Hooks for DBX Format
  469. -------------------------------
  470.    These are hooks for DBX format.
  471. `DBX_OUTPUT_LBRAC (STREAM, NAME)'
  472.      Define this macro to say how to output to STREAM the debugging
  473.      information for the start of a scope level for variable names.  The
  474.      argument NAME is the name of an assembler symbol (for use with
  475.      `assemble_name') whose value is the address where the scope begins.
  476. `DBX_OUTPUT_RBRAC (STREAM, NAME)'
  477.      Like `DBX_OUTPUT_LBRAC', but for the end of a scope level.
  478. `DBX_OUTPUT_ENUM (STREAM, TYPE)'
  479.      Define this macro if the target machine requires special handling
  480.      to output an enumeration type.  The definition should be a C
  481.      statement (sans semicolon) to output the appropriate information
  482.      to STREAM for the type TYPE.
  483. `DBX_OUTPUT_FUNCTION_END (STREAM, FUNCTION)'
  484.      Define this macro if the target machine requires special output at
  485.      the end of the debugging information for a function.  The
  486.      definition should be a C statement (sans semicolon) to output the
  487.      appropriate information to STREAM.  FUNCTION is the
  488.      `FUNCTION_DECL' node for the function.
  489. `DBX_OUTPUT_STANDARD_TYPES (SYMS)'
  490.      Define this macro if you need to control the order of output of the
  491.      standard data types at the beginning of compilation.  The argument
  492.      SYMS is a `tree' which is a chain of all the predefined global
  493.      symbols, including names of data types.
  494.      Normally, DBX output starts with definitions of the types for
  495.      integers and characters, followed by all the other predefined
  496.      types of the particular language in no particular order.
  497.      On some machines, it is necessary to output different particular
  498.      types first.  To do this, define `DBX_OUTPUT_STANDARD_TYPES' to
  499.      output those symbols in the necessary order.  Any predefined types
  500.      that you don't explicitly output will be output afterward in no
  501.      particular order.
  502.      Be careful not to define this macro so that it works only for C.
  503.      There are no global variables to access most of the built-in
  504.      types, because another language may have another set of types.
  505.      The way to output a particular type is to look through SYMS to see
  506.      if you can find it.  Here is an example:
  507.           {
  508.             tree decl;
  509.             for (decl = syms; decl; decl = TREE_CHAIN (decl))
  510.               if (!strcmp (IDENTIFIER_POINTER (DECL_NAME (decl)),
  511.                            "long int"))
  512.                 dbxout_symbol (decl);
  513.             ...
  514.           }
  515.      This does nothing if the expected type does not exist.
  516.      See the function `init_decl_processing' in `c-decl.c' to find the
  517.      names to use for all the built-in C types.
  518.      Here is another way of finding a particular type:
  519.           {
  520.             tree decl;
  521.             for (decl = syms; decl; decl = TREE_CHAIN (decl))
  522.               if (TREE_CODE (decl) == TYPE_DECL
  523.                   && (TREE_CODE (TREE_TYPE (decl))
  524.                       == INTEGER_CST)
  525.                   && TYPE_PRECISION (TREE_TYPE (decl)) == 16
  526.                   && TYPE_UNSIGNED (TREE_TYPE (decl)))
  527.                 /* This must be `unsigned short'.  */
  528.                 dbxout_symbol (decl);
  529.             ...
  530.           }
  531. `NO_DBX_FUNCTION_END'
  532.      Some stabs encapsulation formats (in particular ECOFF), cannot
  533.      handle the `.stabs "",N_FUN,,0,0,Lscope-function-1' gdb dbx
  534.      extention construct.  On those machines, define this macro to turn
  535.      this feature off without disturbing the rest of the gdb extensions.
  536. File: gcc.info,  Node: File Names and DBX,  Next: SDB and DWARF,  Prev: DBX Hooks,  Up: Debugging Info
  537. File Names in DBX Format
  538. ------------------------
  539.    This describes file names in DBX format.
  540. `DBX_WORKING_DIRECTORY'
  541.      Define this if DBX wants to have the current directory recorded in
  542.      each object file.
  543.      Note that the working directory is always recorded if GDB
  544.      extensions are enabled.
  545. `DBX_OUTPUT_MAIN_SOURCE_FILENAME (STREAM, NAME)'
  546.      A C statement to output DBX debugging information to the stdio
  547.      stream STREAM which indicates that file NAME is the main source
  548.      file--the file specified as the input file for compilation.  This
  549.      macro is called only once, at the beginning of compilation.
  550.      This macro need not be defined if the standard form of output for
  551.      DBX debugging information is appropriate.
  552. `DBX_OUTPUT_MAIN_SOURCE_DIRECTORY (STREAM, NAME)'
  553.      A C statement to output DBX debugging information to the stdio
  554.      stream STREAM which indicates that the current directory during
  555.      compilation is named NAME.
  556.      This macro need not be defined if the standard form of output for
  557.      DBX debugging information is appropriate.
  558. `DBX_OUTPUT_MAIN_SOURCE_FILE_END (STREAM, NAME)'
  559.      A C statement to output DBX debugging information at the end of
  560.      compilation of the main source file NAME.
  561.      If you don't define this macro, nothing special is output at the
  562.      end of compilation, which is correct for most machines.
  563. `DBX_OUTPUT_SOURCE_FILENAME (STREAM, NAME)'
  564.      A C statement to output DBX debugging information to the stdio
  565.      stream STREAM which indicates that file NAME is the current source
  566.      file.  This output is generated each time input shifts to a
  567.      different source file as a result of `#include', the end of an
  568.      included file, or a `#line' command.
  569.      This macro need not be defined if the standard form of output for
  570.      DBX debugging information is appropriate.
  571. File: gcc.info,  Node: SDB and DWARF,  Prev: File Names and DBX,  Up: Debugging Info
  572. Macros for SDB and DWARF Output
  573. -------------------------------
  574.    Here are macros for SDB and DWARF output.
  575. `SDB_DEBUGGING_INFO'
  576.      Define this macro if GNU CC should produce COFF-style debugging
  577.      output for SDB in response to the `-g' option.
  578. `DWARF_DEBUGGING_INFO'
  579.      Define this macro if GNU CC should produce dwarf format debugging
  580.      output in response to the `-g' option.
  581. `DWARF2_DEBUGGING_INFO'
  582.      Define this macro if GNU CC should produce dwarf version 2 format
  583.      debugging output in response to the `-g' option.
  584.      To support optional call frame debugging information, you must also
  585.      define `INCOMING_RETURN_ADDR_RTX' and either set
  586.      `RTX_FRAME_RELATED_P' on the prologue insns if you use RTL for the
  587.      prologue, or call `dwarf2out_def_cfa' and `dwarf2out_reg_save' as
  588.      appropriate from `FUNCTION_PROLOGUE' if you don't.
  589. `DWARF2_FRAME_INFO'
  590.      Define this macro to a nonzero value if GNU CC should always output
  591.      Dwarf 2 frame information.  If `DWARF2_UNWIND_INFO' (*note
  592.      Exception Region Output::. is nonzero, GNU CC will output this
  593.      information not matter how you define `DWARF2_FRAME_INFO'.
  594. `LINKER_DOES_NOT_WORK_WITH_DWARF2'
  595.      Define this macro if the linker does not work with Dwarf version 2.
  596.      Normally, if the user specifies only `-ggdb' GNU CC will use Dwarf
  597.      version 2 if available; this macro disables this.  See the
  598.      description of the `PREFERRED_DEBUGGING_TYPE' macro for more
  599.      details.
  600. `PUT_SDB_...'
  601.      Define these macros to override the assembler syntax for the
  602.      special SDB assembler directives.  See `sdbout.c' for a list of
  603.      these macros and their arguments.  If the standard syntax is used,
  604.      you need not define them yourself.
  605. `SDB_DELIM'
  606.      Some assemblers do not support a semicolon as a delimiter, even
  607.      between SDB assembler directives.  In that case, define this macro
  608.      to be the delimiter to use (usually `\n').  It is not necessary to
  609.      define a new set of `PUT_SDB_OP' macros if this is the only change
  610.      required.
  611. `SDB_GENERATE_FAKE'
  612.      Define this macro to override the usual method of constructing a
  613.      dummy name for anonymous structure and union types.  See
  614.      `sdbout.c' for more information.
  615. `SDB_ALLOW_UNKNOWN_REFERENCES'
  616.      Define this macro to allow references to unknown structure, union,
  617.      or enumeration tags to be emitted.  Standard COFF does not allow
  618.      handling of unknown references, MIPS ECOFF has support for it.
  619. `SDB_ALLOW_FORWARD_REFERENCES'
  620.      Define this macro to allow references to structure, union, or
  621.      enumeration tags that have not yet been seen to be handled.  Some
  622.      assemblers choke if forward tags are used, while some require it.
  623. File: gcc.info,  Node: Cross-compilation,  Next: Misc,  Prev: Debugging Info,  Up: Target Macros
  624. Cross Compilation and Floating Point
  625. ====================================
  626.    While all modern machines use 2's complement representation for
  627. integers, there are a variety of representations for floating point
  628. numbers.  This means that in a cross-compiler the representation of
  629. floating point numbers in the compiled program may be different from
  630. that used in the machine doing the compilation.
  631.    Because different representation systems may offer different amounts
  632. of range and precision, the cross compiler cannot safely use the host
  633. machine's floating point arithmetic.  Therefore, floating point
  634. constants must be represented in the target machine's format.  This
  635. means that the cross compiler cannot use `atof' to parse a floating
  636. point constant; it must have its own special routine to use instead.
  637. Also, constant folding must emulate the target machine's arithmetic (or
  638. must not be done at all).
  639.    The macros in the following table should be defined only if you are
  640. cross compiling between different floating point formats.
  641.    Otherwise, don't define them.  Then default definitions will be set
  642. up which use `double' as the data type, `==' to test for equality, etc.
  643.    You don't need to worry about how many times you use an operand of
  644. any of these macros.  The compiler never uses operands which have side
  645. effects.
  646. `REAL_VALUE_TYPE'
  647.      A macro for the C data type to be used to hold a floating point
  648.      value in the target machine's format.  Typically this would be a
  649.      `struct' containing an array of `int'.
  650. `REAL_VALUES_EQUAL (X, Y)'
  651.      A macro for a C expression which compares for equality the two
  652.      values, X and Y, both of type `REAL_VALUE_TYPE'.
  653. `REAL_VALUES_LESS (X, Y)'
  654.      A macro for a C expression which tests whether X is less than Y,
  655.      both values being of type `REAL_VALUE_TYPE' and interpreted as
  656.      floating point numbers in the target machine's representation.
  657. `REAL_VALUE_LDEXP (X, SCALE)'
  658.      A macro for a C expression which performs the standard library
  659.      function `ldexp', but using the target machine's floating point
  660.      representation.  Both X and the value of the expression have type
  661.      `REAL_VALUE_TYPE'.  The second argument, SCALE, is an integer.
  662. `REAL_VALUE_FIX (X)'
  663.      A macro whose definition is a C expression to convert the
  664.      target-machine floating point value X to a signed integer.  X has
  665.      type `REAL_VALUE_TYPE'.
  666. `REAL_VALUE_UNSIGNED_FIX (X)'
  667.      A macro whose definition is a C expression to convert the
  668.      target-machine floating point value X to an unsigned integer.  X
  669.      has type `REAL_VALUE_TYPE'.
  670. `REAL_VALUE_RNDZINT (X)'
  671.      A macro whose definition is a C expression to round the
  672.      target-machine floating point value X towards zero to an integer
  673.      value (but still as a floating point number).  X has type
  674.      `REAL_VALUE_TYPE', and so does the value.
  675. `REAL_VALUE_UNSIGNED_RNDZINT (X)'
  676.      A macro whose definition is a C expression to round the
  677.      target-machine floating point value X towards zero to an unsigned
  678.      integer value (but still represented as a floating point number).
  679.      X has type `REAL_VALUE_TYPE', and so does the value.
  680. `REAL_VALUE_ATOF (STRING, MODE)'
  681.      A macro for a C expression which converts STRING, an expression of
  682.      type `char *', into a floating point number in the target machine's
  683.      representation for mode MODE.  The value has type
  684.      `REAL_VALUE_TYPE'.
  685. `REAL_INFINITY'
  686.      Define this macro if infinity is a possible floating point value,
  687.      and therefore division by 0 is legitimate.
  688. `REAL_VALUE_ISINF (X)'
  689.      A macro for a C expression which determines whether X, a floating
  690.      point value, is infinity.  The value has type `int'.  By default,
  691.      this is defined to call `isinf'.
  692. `REAL_VALUE_ISNAN (X)'
  693.      A macro for a C expression which determines whether X, a floating
  694.      point value, is a "nan" (not-a-number).  The value has type `int'.
  695.      By default, this is defined to call `isnan'.
  696.    Define the following additional macros if you want to make floating
  697. point constant folding work while cross compiling.  If you don't define
  698. them, cross compilation is still possible, but constant folding will
  699. not happen for floating point values.
  700. `REAL_ARITHMETIC (OUTPUT, CODE, X, Y)'
  701.      A macro for a C statement which calculates an arithmetic operation
  702.      of the two floating point values X and Y, both of type
  703.      `REAL_VALUE_TYPE' in the target machine's representation, to
  704.      produce a result of the same type and representation which is
  705.      stored in OUTPUT (which will be a variable).
  706.      The operation to be performed is specified by CODE, a tree code
  707.      which will always be one of the following: `PLUS_EXPR',
  708.      `MINUS_EXPR', `MULT_EXPR', `RDIV_EXPR', `MAX_EXPR', `MIN_EXPR'.
  709.      The expansion of this macro is responsible for checking for
  710.      overflow.  If overflow happens, the macro expansion should execute
  711.      the statement `return 0;', which indicates the inability to
  712.      perform the arithmetic operation requested.
  713. `REAL_VALUE_NEGATE (X)'
  714.      A macro for a C expression which returns the negative of the
  715.      floating point value X.  Both X and the value of the expression
  716.      have type `REAL_VALUE_TYPE' and are in the target machine's
  717.      floating point representation.
  718.      There is no way for this macro to report overflow, since overflow
  719.      can't happen in the negation operation.
  720. `REAL_VALUE_TRUNCATE (MODE, X)'
  721.      A macro for a C expression which converts the floating point value
  722.      X to mode MODE.
  723.      Both X and the value of the expression are in the target machine's
  724.      floating point representation and have type `REAL_VALUE_TYPE'.
  725.      However, the value should have an appropriate bit pattern to be
  726.      output properly as a floating constant whose precision accords
  727.      with mode MODE.
  728.      There is no way for this macro to report overflow.
  729. `REAL_VALUE_TO_INT (LOW, HIGH, X)'
  730.      A macro for a C expression which converts a floating point value X
  731.      into a double-precision integer which is then stored into LOW and
  732.      HIGH, two variables of type INT.
  733. `REAL_VALUE_FROM_INT (X, LOW, HIGH, MODE)'
  734.      A macro for a C expression which converts a double-precision
  735.      integer found in LOW and HIGH, two variables of type INT, into a
  736.      floating point value which is then stored into X.  The value is in
  737.      the target machine's representation for mode MODE and has the type
  738.      `REAL_VALUE_TYPE'.
  739.